<template>
  <div>
    <ul>
      <li v-for="(item, index) in arr" :key="item.uid">
        {{item.num}} <input type="button" value="Delete" @click="arr.splice(index, 1)">
      </li>
    </ul>
    <button @click="addNum">New a random number</button>
  </div>
</template>

<script>
export default {
  data() {
    return {
      arr: []
    }
  },
  methods: {
    addNum(){
      const num = Math.floor(Math.random()* 10)
      const uid = +new Date()
      this.arr.push({num,uid})
    }
  }
}
</script>

<style>

</style>